package steven.sdc.appPoker.Adapter;

import java.util.ArrayList;
import java.util.List;

import com.amurani.slidingmenu.R;

import steven.sdc.appPoker.Items.ItemLichSu;
import steven.sdc.appPoker.Items.ItemNguoiChoi;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;

public class AdapterLichSu extends ArrayAdapter<ItemLichSu> {
	 private ArrayList<ItemLichSu> Items;
	 int layoutId;
	    Context frag;
	    private LayoutInflater inflater;

	public AdapterLichSu(Context frag, int layoutId, ArrayList<ItemLichSu> list) {
		super(frag, R.layout.list_item_lichsu1, list);
		this.Items = list;
		this.frag = frag;
		this.layoutId = layoutId;
		inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
	}
	 public View getView(int position, View convertView, ViewGroup parent) {
	    	
	        convertView = inflater.inflate(R.layout.list_item_lichsu1, null);
	        TextView txt_stt = (TextView) convertView.findViewById(R.id.text_sothutu);
	        TextView txt_ngay = (TextView) convertView.findViewById(R.id.text_ngay);
	        TextView txt_ten = (TextView) convertView.findViewById(R.id.text_nguoichienthang);
	        
	        ItemLichSu item = Items.get(position);
	        txt_stt.setText(""+item.so);
	        txt_ngay.setText(""+item.ngay);
	        txt_ten.setText(""+item.nguoithang);
	        return convertView;
	    }
}
